<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>会员添加--layui后台管理模板</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<style type="text/css">
		.layui-form-item .layui-inline{ width:33.333%; float:left; margin-right:0; }
		@media(max-width:1240px){
			.layui-form-item .layui-inline{ width:100%; float:none; }
		}
/* SIBLING FADE: fade out siblings around a hovered item */

.sibling-fade { visibility: hidden; }
/* Prevents :hover from triggering in the gaps between items */

.sibling-fade > * { visibility: visible; }
/* Brings the child items back in, even though the parent is `hidden` */

.sibling-fade > * { transition: opacity 150ms linear 100ms, transform 150ms ease-in-out 100ms; }
/* Makes the fades smooth with a slight delay to prevent jumps as the mouse moves between items */

.sibling-fade:hover > * { opacity: 0.4; transform: scale(0.9); }
/* Fade out all items when the parent is hovered */

.sibling-fade > *:hover { opacity: 1; transform: scale(1); transition-delay: 0ms, 0ms; }
/* Fade in the currently hovered item */

/* Presentational Styles */
html { display: flex; height: 100%; }
body { 
  background: #393d49;
  padding: 10px;
  max-width: 40em;
  margin: auto;
}

.sibling-fade {
  display: flex;
  flex-wrap: wrap;
}

.sibling-fade > * {
  background: white;
  padding: 1em;
  flex: auto;
  margin: 0.3em;
  text-align: center;
  color: #f05555;
  font-size: 1.5em;
  text-decoration: none;
}
</style>
</head>
<body class="childrenBody" ng-app="Notes" ng-controller="NotesCtrl">
	<form class="layui-form" style="width:80%;">
		<div class="sibling-fade">
			<a class="btn btn-primary btn-lg btn-block" href="#"
				ng-repeat="gee in bee.data" title="{{ gee.mark}}" 
				onclick="chooseOrg(this)" data-id="{{gee.id}}">
				{{ gee.name}}</a>
		</div>
	</form>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript" src="../../../js/jquery-2.1.4.min.js" ></script>
	<script type="text/javascript" src="../../../js/angular/angular.min.js" ></script>
	<script type="text/javascript" src="../../../js/angular/angular-resource.min.js" ></script>
	<script type="text/javascript" src="../../../js/jquery-2.1.4.min.js" ></script>
	<script type="text/javascript" src="../../../js/layer/layer.js" ></script>
	<script type="text/javascript" src="../../../js/base.js" ></script>
	<script type="text/javascript">
		if($.webSignState()) {
			var strl = $.httpRootPath() + "api/web/organize/see";

			var Demo = angular.module('Notes', ['ngResource']);

			Demo.factory('Notes', ['$resource', function($resource) {
				return $resource(strl, {}, {
					query: {
						method: 'GET',
						params: {},
						isArray: true
					}
				});
			}]);

			Demo.controller('NotesCtrl', ['$scope', 'Notes', function($scope, Notes) {
				Notes.get(function(resp) {
					//处理成功 
					if(resp.code == "00") {
						$scope.bee = Notes.get();
					} else if(resp.code == "02") {
						layer.msg('信息为空', {
							icon: 1
						});
					} else {
						layer.msg('获取失败', {
							icon: 1
						});
					}
				}, function(err) {
					layer.msg('未知错误', {
						icon: 0
					});
					setTimeout(function() {
						history.go(-1)
					}, 1000);
				});
			}]);
		} else {
			layer.confirm('您未登录,是否先登录?', {
					icon: 3,
					title: '提示'
				},
				function(index) {
					window.location.href = "signin.html";
					layer.close(index);
				});
		}
		function chooseOrg(e){
			var oid = e.getAttribute("data-id");
			console.log(oid+"----");
			window.sessionStorage["organizeId"] = oid;
			if (window.sessionStorage["organizeId"]) {
				var oid = window.sessionStorage.getItem("organizeId");
				console.log("选择的organizeId:"+oid);
			}
		}
	</script>
</body>
</html>